package exam.huatai.S2;

import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        String[] split = s.split(",");
        int n = Integer.parseInt(split[0]);
        int k = Integer.parseInt(split[1]);
        int[] nums = new int[n];
        for (int i = 0; i < n; i++) {
            if (i == 0) {
                nums[i] = Integer.parseInt(split[i+2].substring(1));
            } else if (i == n-1) {
                nums[i] = Integer.parseInt(split[i+2].substring(0, split[i+2].length()-1));
            } else {
                nums[i] = Integer.parseInt(split[i+2]);
            }
        }
        System.out.println(solution(nums, k));
    }

    private static int solution(int[] nums, int target) {
        return upper_bound_(nums.length, target, nums);
    }

    public static int upper_bound_ (int n, int v, int[] a) {
        int left = 0, right = a.length;
        while (left < right) {
            int mid = left + (right - left) / 2;
            if (a[mid] < v)
                left = mid + 1;
            else
                right = mid;
        }
        return left + 1;
    }
}
